
type parameter constraints 871
instance constructors and, 191–194
partial, 164
SurrogateSelector class, 688
symbolic names, 383–384
sync blocks, 830–835
synchronization. See thread synchronization
SynchronizationContext class, 771–772
synchronous operations, 755–760, 779
System Monitor control, 589
SZ arrays, 387, 396
T
task factories, 735–737
Task Manager (Windows), 697–698
tasks
cancelling, 729–730
converting EAP, 786
converting IAsyncResult, 783–784
defined, 726
internal components, 733–735
overview, 726–727
scheduling, 737–739
starting automatically, 731–732
starting child tasks, 733
waiting for completion of, 727–729
TaskScheduler type, 737, 743
TEB (thread environment block), 693
this keyword, 210, 213
Thread class, 800
thread environment block (TEB), 693
thread ownership, 827–829
thread pool
APM considerations, 776–777
calling methods asynchronously, 720
managing threads, 750–752
overview, 718–719
setting limits, 750–751
thread synchronization
blocking threads, 842–843
calling methods, 822–823
class libraries and, 793–794
concurrent collection classes, 856–859
condition variable pattern, 848–850
considerations for holding locks, 851–854
double-check locking, 844–848
event constructs, 817–819
hybrid constructs, 829–843
hybrid locks, 826–829
implementing spin locks, 807–811
interlocked constructs, 803–807, 811–812
kernel-mode constructs, 813–816
mutex constructs and, 820–822
overview, 791–793
primitive constructs, 794–796
recursion, 827–829
semaphore constructs, 819
user-mode constructs, 796–797
volatile constructs, 797–803
ThreadPool class, 719–720, 726
threads
application models, 770–773
asynchronous operations and, 704–705
blocking, 842–843
CLR considerations, 703
controlling, 617–620
CPU trends and, 699–700
delaying processing, 809–811
execution contexts, 721–722
foreground versus background, 713–714
garbage collection and, 696
hijacking, 583–584
managing, 750–752
NUMA considerations, 700–703
overhead considerations, 692–696
performance considerations, 696–699
priority considerations, 708–713
rationale for supporting, 691–692
reasons for using, 706–708
runtime relationships, 102–111
scheduling, 708–713
worker, 751–752
ThreadsSharingData class, 801
throwing exceptions, 480–481
Timer class, 747–749
TimerCallback delegate type, 719, 747
ToString method, 350–359, 381
try block, 468
Tuple type, 247, 250–252
type arguments
code explosion, 288–289
contravariant/covariant, 291–292
defined, 277
type constructors
calling, 195
defined, 155, 194
overview, 194–197
performance considerations, 198–200
type inference, 294–295
type members
accessibility, 160–162, 172–174
binding, 650–659
discovering, 637–659
filtering, 643–644
invoking, 646–650
kinds supported, 155–158
partial keyword, 164
static classes, 162–163
type objects, 283, 628–631
type parameter constraints, 300